package pl.org.lutra.planner.model.data;

import java.util.ArrayList;
import java.util.List;

public class Dive {
    private List<DiveSegment> segments = new ArrayList<DiveSegment>();
    
    public Dive() {
        DiveSegment segment = new DiveSegment();
        segment.setStartDepth(0);
        segments.add(segment);
    }
    
    public DiveSegment getSegment(int index) {
        if ((index > -1) && (index < segments.size())) {
            return segments.get(index);
        } else {
            return null;
        }
    }
    
    public List<DiveSegment> getSegments() {
        return segments;
    }
    
}
